Fix a problem where were the offset into the image was passed into
authorOwen Taylor <otaylor@redhat.com>
Tue, 8 Jan 2002 03:22:13 +0000 (03:22 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 8 Jan 2002 03:22:13 +0000 (03:22 +0000)
Mon Jan  7 22:19:32 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (draw_with_pixmaps): Fix a
        problem where were the offset into the image was passed
        into convert_to_format() wrong.

        * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Call
        gdk_x11_drawable_update_picture_clip () before using
        the picture; allow update_picture_clip() to take a NULL gc
        to mean no clipping.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/x11/gdkdrawable-x11.c

index ceb854162bda9d881b3bda12ed95170022ad1948..e5e2e708c3e1703879f4be8662a98f35425c8e32 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Mon Jan  7 22:19:32 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkdrawable-x11.c (draw_with_pixmaps): Fix a
+       problem where were the offset into the image was passed
+       into convert_to_format() wrong.
+
+       * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Call
+       gdk_x11_drawable_update_picture_clip () before using
+       the picture; allow update_picture_clip() to take a NULL gc
+       to mean no clipping.
+
 2002-01-07  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtksocket.c (gtk_socket_get_id): Doc typo fix. (#68172)
index ceb854162bda9d881b3bda12ed95170022ad1948..e5e2e708c3e1703879f4be8662a98f35425c8e32 100644 (file)
@@ -1,3 +1,14 @@
+Mon Jan  7 22:19:32 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkdrawable-x11.c (draw_with_pixmaps): Fix a
+       problem where were the offset into the image was passed
+       into convert_to_format() wrong.
+
+       * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Call
+       gdk_x11_drawable_update_picture_clip () before using
+       the picture; allow update_picture_clip() to take a NULL gc
+       to mean no clipping.
+
 2002-01-07  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtksocket.c (gtk_socket_get_id): Doc typo fix. (#68172)
index ceb854162bda9d881b3bda12ed95170022ad1948..e5e2e708c3e1703879f4be8662a98f35425c8e32 100644 (file)
@@ -1,3 +1,14 @@
+Mon Jan  7 22:19:32 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkdrawable-x11.c (draw_with_pixmaps): Fix a
+       problem where were the offset into the image was passed
+       into convert_to_format() wrong.
+
+       * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Call
+       gdk_x11_drawable_update_picture_clip () before using
+       the picture; allow update_picture_clip() to take a NULL gc
+       to mean no clipping.
+
 2002-01-07  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtksocket.c (gtk_socket_get_id): Doc typo fix. (#68172)
index ceb854162bda9d881b3bda12ed95170022ad1948..e5e2e708c3e1703879f4be8662a98f35425c8e32 100644 (file)
@@ -1,3 +1,14 @@
+Mon Jan  7 22:19:32 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkdrawable-x11.c (draw_with_pixmaps): Fix a
+       problem where were the offset into the image was passed
+       into convert_to_format() wrong.
+
+       * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Call
+       gdk_x11_drawable_update_picture_clip () before using
+       the picture; allow update_picture_clip() to take a NULL gc
+       to mean no clipping.
+
 2002-01-07  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtksocket.c (gtk_socket_get_id): Doc typo fix. (#68172)
index ceb854162bda9d881b3bda12ed95170022ad1948..e5e2e708c3e1703879f4be8662a98f35425c8e32 100644 (file)
@@ -1,3 +1,14 @@
+Mon Jan  7 22:19:32 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkdrawable-x11.c (draw_with_pixmaps): Fix a
+       problem where were the offset into the image was passed
+       into convert_to_format() wrong.
+
+       * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Call
+       gdk_x11_drawable_update_picture_clip () before using
+       the picture; allow update_picture_clip() to take a NULL gc
+       to mean no clipping.
+
 2002-01-07  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtksocket.c (gtk_socket_get_id): Doc typo fix. (#68172)
index ceb854162bda9d881b3bda12ed95170022ad1948..e5e2e708c3e1703879f4be8662a98f35425c8e32 100644 (file)
@@ -1,3 +1,14 @@
+Mon Jan  7 22:19:32 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkdrawable-x11.c (draw_with_pixmaps): Fix a
+       problem where were the offset into the image was passed
+       into convert_to_format() wrong.
+
+       * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Call
+       gdk_x11_drawable_update_picture_clip () before using
+       the picture; allow update_picture_clip() to take a NULL gc
+       to mean no clipping.
+
 2002-01-07  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtksocket.c (gtk_socket_get_id): Doc typo fix. (#68172)
index ceb854162bda9d881b3bda12ed95170022ad1948..e5e2e708c3e1703879f4be8662a98f35425c8e32 100644 (file)
@@ -1,3 +1,14 @@
+Mon Jan  7 22:19:32 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkdrawable-x11.c (draw_with_pixmaps): Fix a
+       problem where were the offset into the image was passed
+       into convert_to_format() wrong.
+
+       * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Call
+       gdk_x11_drawable_update_picture_clip () before using
+       the picture; allow update_picture_clip() to take a NULL gc
+       to mean no clipping.
+
 2002-01-07  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtksocket.c (gtk_socket_get_id): Doc typo fix. (#68172)
index 221e4e0d308d3587748275bdf93f570a1b41f956..ad4c97096b7f8feb23cb8aebffde2d1ff1ca706d 100644 (file)
@@ -265,11 +265,11 @@ static void
 gdk_x11_drawable_update_picture_clip (GdkDrawable *drawable,
                                      GdkGC       *gc)
 {
-  GdkGCX11 *gc_private = GDK_GC_X11 (gc);  
+  GdkGCX11 *gc_private = gc ? GDK_GC_X11 (gc) : NULL;
   GdkDrawableImplX11 *impl = GDK_DRAWABLE_IMPL_X11 (drawable);
   Picture picture = gdk_x11_drawable_get_picture (drawable);
 
-  if (gc_private->clip_region)
+  if (gc && gc_private->clip_region)
     {
       GdkRegionBox *boxes = gc_private->clip_region->rects;
       gint n_boxes = gc_private->clip_region->numRects;
@@ -1127,7 +1127,7 @@ draw_with_images (GdkDrawable       *drawable,
          image = _gdk_image_get_scratch (width1, height1, 32, &xs0, &ys0);
          
          convert_to_format (src_rgb + y0 * src_rowstride + 4 * x0, src_rowstride,
-                            image->mem + ys0 * image->bpl + 4 * xs0, image->bpl,
+                            image->mem + ys0 * image->bpl + xs0 * image->bpp, image->bpl,
                             format_type, image->byte_order, 
                             width1, height1);
 
@@ -1238,9 +1238,9 @@ draw_with_pixmaps (GdkDrawable       *drawable,
          image = _gdk_image_get_scratch (width1, height1, 32, &xs0, &ys0);
          if (!get_shm_pixmap_for_image (xdisplay, image, format, mask_format, &pix, &pict, &mask))
            return FALSE;
-         
+
          convert_to_format (src_rgb + y0 * src_rowstride + 4 * x0, src_rowstride,
-                            image->mem + ys0 * image->bpl + 4 * xs0, image->bpl,
+                            image->mem + ys0 * image->bpl + xs0 * image->bpp, image->bpl,
                             format_type, image->byte_order, 
                             width1, height1);
 
@@ -1290,9 +1290,11 @@ gdk_x11_draw_pixbuf (GdkDrawable     *drawable,
       return;
     }
 
+  gdk_x11_drawable_update_picture_clip (drawable, gc);
+
   rowstride = gdk_pixbuf_get_rowstride (pixbuf);
 
-#ifdef USE_SHM  
+#ifdef USE_SHM
   if (use_pixmaps)
     {
       if (!draw_with_pixmaps (drawable, gc,